XK0-004 Free Questions Good Demo For CompTIA XK0-004 Exam Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well 1. DRAG DROP You have been asked to parse a log file of logins to determine various information about who is logging in and when. INSTRUCTIONS Open and inspect the Login log file. Drag and drop the correct commands onto the output that was generated from that command. Tokens can be used only once and not all will be used. If at any time you would like to bring back the initial state of the simulation, please click the Reset All button. Answer: Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well 2.Which of the following server roles utilize a heartbeat/polling process? (Choose two.) A. Proxy B. Certificate authority C. Logging D. File server E. Cluster F. Load balancer Answer: E,F 3.Given that a company’s policy states that users cannot install third-party tools on Window servers, which of the following protocols will allow a Linux GUI to connect to a Windows server? A. VNC B. NX Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well C. RDP D. X11 Answer: A Explanation: Reference: https://phoenixnap.com/kb/ssh-to-connect-to-remote-server-linux-or- windows 4.A storage administrator in a virtualized environment has been told by a user that there is no space left on the volume to which the user can write. However, a check reveals that there is 20GB of unused space. Which of the following explains the discrepancy? A. The drive is not formatted B. The drive is thin provisioned C. The drive is thick provision eager zeroed D. The drive space is overallocated Answer: B 5.While creating a file on a volume, the Linux administrator receives the following message: No space left on device. Running the df Cm command, the administrator notes there is still 50% of usage left. Which of the following is the NEXT step the administrator should take to analyze the issue without losing data? A. Run the df Ci command and notice the inode exhaustion B. Run the df Ch command and notice the space exhaustion C. Run the df CB command and notice the block size D. Run the df Ck command and notice the storage exhaustion Answer: A Explanation: Reference: https://www.tecmint.com/how-to-check-disk-space-in-linux/ 6.A user is unable to write data to an NFS datastore at /mnt/storage. A df command indicates 50% free inodes. Which of the following commands should the user attempt NEXT to diagnose the situation? A. df -h /mnt/storage B. du -sh /mnt C. fdisk -l /mnt/storage D. df -i /mnt/storage Answer: C Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well 7.A user tries to log in to the Linux console and receives the following message: Your account has expired; Please contact your system administrator. Which of the following commands was MOST likely run to create this behavior? A. passwd B. usermod C. userdel D. chage Answer: D 8.The development team has automated their software build process so each time a change is submitted to the source code repository, a new software build is compiled. They are requesting that the Linux operations team look into automating the deployment of the software build into the test environment. Which of the following is the benefit to the development team for implementing deployment automation? A. To ensure the build commits are also deployed to the test environment B. To enable notifications when builds are deployed to the test environment C. To ensure software builds in test are not accidentally deployed to production D. To streamline the deployment process for deploying builds into test environments Answer: D 9.Which of the following will provide a list of all flash, external, internal, and SSD drives? A. lspci B. lsmod C. lsblk D. lsusb Answer: C Explanation: Reference: https://www.linux.com/learn/intro-to-linux/2017/3/how-format-storage- devices-linux 10.An administrator notices a website hosted on an httpd web server is not loading. Upon further inspection, the administrator learns there are no httpd processes running. When starting the service, the site operates correctly for a few minutes Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well before the process disappears again. Which of the following should the administrator consider as the MOST likely possibility before troubleshooting? the issue? A. The CPU has too much load, causing it to overheat, and the kernel is automatically killing the processes to keep the CPU cool. B. An external database to which the web server connects is offline, causing httpd to die due to execution errors. C. Shared libraries, which were recently updated, are causing compatibility issues and httpd to die due to version mismatch. D. The out-of-memory killer was activated due to low available memory, causing the kernel to kill the processes automatically. E. The server is intermittently losing access to the network, causing socket errors that trigger httpd to die. Answer: D 11.Ann, a user, has created a new directory and noticed that permissions on the new directory are as follows: drwx------. 1 ann ann 0 Jun 11 08:20 work Which of the following should the administrator do to restore default permissions for newly created directories? A. Change umask value in /etc/profile. B. Run chmod command to update permissions. C. Modify directory ownership to ann:ann with chown. D. Execute chattr command to restore default access. Answer: A Explanation: Reference: https://geek-university.com/linux/set-the-default-permissions-for-newly- created-files/ 12.An issue was discovered on a testing branch of a Git repository. A file was inadvertently modified and needs to be reverted to the master branch version. Which of the following is the BEST option to resolve the issue? A. git branch -b master file B. git merge master testing C. git stash branch master D. git checkout master -- file Answer: D Explanation: Reference: https://www.git-scm.com/book/en/v2/Git-Basics-Undoing-Things Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well 13.A Linux administrator needs to prevent the Postfix mail transfer agent from starting on boot. Which of the following commands will accomplish this task? A. systemctl stop postfix.service B. /etc/init.d/postfix stop C. systemctl disable postfix.service D. /etc/init.d/postfix disable Answer: B Explanation: Reference: https://www.cyberciti.biz/faq/linux-unix-start-stop-restart-postfix/ 14.A systems administrator is configuring options on a newly installed Linux VM that will be deployed to the Pacific time zone. Which of the following sets of commands should the administrator execute to accurately configure the correct time settings? A. cd /etcln Cs /usr/share/zoneinfo/US/Pacific localtime B. cd /usr/localln Cs /usr/share/zoneinfo/US/Pacific zoneinfo C. cd /etc/localln Cs /usr/share/zoneinfo/US/Pacific localtime D. cd /usr/share/localln Cs /usr/share/zoneinfo/US/Pacific localectl Answer: A 15.Which of the following would be the BEST solution for a systems administrator to access the graphical user environment of a Linux machine remotely? A. VNC B. KDE C. X11 D. RPC Answer: A Explanation: Reference: https://www.sfu.ca/computing/about/support/tips/remote-to-linux-with- gui.html 16.Which of the following configuration management tools is considered agentless? A. Ouppet B. Salt C. Ansible D. Chef Answer: C Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well Explanation: Reference: https://www.intigua.com/blog/puppet-vs.-chef-vs.-ansible-vs.-saltstack 17.A Linux administrator needs to disable the Sendmail service on a Linux server and prevent it from being started manually and during boot. Which of the following is the BEST command to do this? A. systemctl reset-failed sendmail B. systemctl mask sendmail C. systemctl stop sendmail D. systemctl disable sendmail Answer: C 18.A Linux administrator retrieved a repository of files from a Git server using git clone. The administrator wants to see if a configuration file was added to the repository. Which of the following Git arguments should be used to see the recent modifications? A. fetch B. log C. init D. pull Answer: D 19.A Linux administrator needs to back up the folder /usr/domain, and the output must be a gzip compressed tar. Which of the following commands should be used? A. tar Ccv domain.tar.gz /usr/domain B. tar Ccvf /usr/domain domain.tar.gz C. tar Cczvf domain.tar.gz /usr/domain D. tar Ccxzv /usr/domain domain.tar.gz Answer: C Explanation: Reference: https://help.ubuntu.com/community/BackupYourSystem/TAR 20.An organization wants to consolidate its entire user information in centralized storage using an X.500-based protocol. Which of the following protocols should be used for this implementation? A. RADIUS B. LDAP C. DNS Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well D. DHCP Answer: B Explanation: Reference: https://en.wikipedia.org/wiki/Directory_service 21.A Linux administrator has downloaded and installed the httpd package. Which of the following commands will start the service immediately and allow the service to start on system boot? A. systemctl start httpd;chkconfig httpd on B. systemctl status httpd;chkconfig httpd on C. systemctl.start httpd;chkconfig httpd on D. systemctl start httpd;chkconfig httpd on 6 Answer: A 22.A site reliability engineer updated the latest configuration management scripts and committed them to a workstream called either test or patch. A Linux administrator wants to ensure these latest workstreams are able to be retrieved to the server. Which of the following is the BEST Git attribute to use? A. branch B. fetch C. log D. pull Answer: D 23.An administrator wants to know the amount of memory installed on a Linux server. Which of the following commands can be used to accomplish this task? A. cat /sys/proc/meminfo B. cat /proc/meminfo C. cat /proc/sys/meminfo D. cat /sys/meminfo Answer: D Explanation: Reference: https://devconnected.com/how-to-check-ram-on-linux/#:~:text=The most popular command in,use the “free” command.&text=As you can see%2C the,(also called virtual memory) 24. Create the quota database files and generate the disk usage table. 25.A junior Linux administrator is setting up system-wide configuration settings. Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well The goal is to ensure the PATH environment variable includes the following locations for all users who log into a Linux system. The administrator issues the following commands at the terminal: Respectively, the output of these commands is as follows: Given this output, which of the following would be the BEST action for the administrator to perform to address this issue? A. Update the /etc/profile.d file using a text editor, navigate to the PATH element add the missing locations, and run the bash_completion.sh script to update the changes. B. Update the /etc/profile file using a text editor, navigate to the PATH element, add the missing locations and run the . /etc/profile command to update the changes. C. Update the /etc/profile.d file using a text editor, navigate to the PATH element, add the missing locations, and reboot to update the changes. D. Update the /etc/profile file using a text editor navigate to the PATH element, add the missing locations, and restart the bash process to update the changes. Answer: B Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well 26.A junior administrator of a physical server receives log messages indicating the out- of-memory killer has been active. All memory slots are in use on the motherboard, but additional disk space is available. Space has been allocated for a swap file. Which of the following should the administrator use to reduce the output of memory messages? A. free : swapoff / swapfile ; swapon -a B. mkswap /swapfile; swapon Ca C. fallocate Cl 2G /swapfile && swapon Ca D. echo “1” > /proc/meninfo ; swapon / swapfile Answer: A 27.The following represents a partial listing of a user’s .bashrc file: HISTSIZE=800 HISTFILESIZE=1000 umask 2002 HISTCONTROL=ignoreboth When the user opens a terminal, an error message appears: Octal number out of range Which of the following lines in the partial .bashrc should be modified to prevent the error from occurring? A. HISTSIZE=800 B. HISTFILESIZE=1000 C. umask 2002 D. HISTCONTROL=ignoreboth Answer: C 28.A systems administrator is troubleshooting an intermittent network connection at the IP address 192.168.1.23. The administrator wishes to monitor the connection at five-minute intervals for one hour. Which of the following commands will accomplish this task? A. ping -i 5 192.168.1.23 B. ping -c 12 192.168.1.23 C. ping -c 12 -i 300 192.168.1.23 D. ping -c 60 -i 100 192.168.1.23 Answer: B Explanation: Reference: https://linuxize.com/post/linux-ping-command/ Valid CompTIA XK0-004 Exam Questions [2022] Prepare XK0-004 Exam Well 29.A systems administrator suspects a process with a PID of 2864 is consuming resources at an alarming rate. The administrator uses the command renice -n -5 -p2864, but it does not solve the issue. Which of the following commands should the administrator execute to correct the issue? A. nice -n 5 -p 2864 B. nice -n -5 -p 2864 C. renice -n 10 -p 2864 D. renice -n -10 -p 2864 Answer: D 30. Verify if /home has quotas enabled in /etc/fstab and, if not, enable it. 31. Remount /home. 32.Which of the following is the BEST reason for not storing database files in the /var directory? A. The /var filesystem is not fast enough for database files. B. The number of files in /var is limited by the available inodes. C. Files in /var do not have strict file permissions. D. If log files fill up /var, it might corrupt the database. Answer: D 33.A newly installed desktop is unable to connect to networked resources. The systems administrator executes various commands and reviews the following output snippets: Which of the following should the systems administrator try NEXT to restore connectivity? A. arp -s 20:ad:1f:ab:10:0f 192.168.1.10 B. route add -net 192.168.1.0 netmask 255.255.255.0 C. dig -x @127.0.0.1 192.168.1.10 D. ip link set wlo1 up E. killall -HUP NetworkManager Answer: D Go To XK0-004 Exam Questions Full Version